import axios from "@/utils/request";


/**
 * @description 新增地址
 * @param data 
 * @param option 
 * @returns 
 */
export const addAddressAPI = (data={},option={}) => axios.post("/address/add",data,{ ...option});


/**
 * @description 获取默认地址
 * @param data 
 * @param option 
 * @returns 
 */
export const getDefaultAddressAPI = (data={},option={}) => axios.post("/address/defaultAddress",data,{ ...option});


/**
 * @description 更新地址
 * @param data 
 * @param option 
 * @returns 
 */
export const updateAddressAPI = (data={},option={}) => axios.post("/address/update",data,{ ...option});


/**
 * @description 删除
 * @param data 
 * @param option 
 * @returns 
 */
export const deleteAddressAPI = (data={},option={}) => axios.post("/address/delete",data,{ ...option});

/**
 * @description 获取地址列表
 * @param data 
 * @param option 
 * @returns 
 */
export const getAddressListAPI = (data={},option={}) => axios.get("/address/list",{   
    params:data, 
    ...option
})